1. Field of the Invention
The present invention relates to a system, method, and program for determining a number of write operations to execute when performing a series of write operations.
2. Description of the Related Art
Data storage systems often include a data protection component that involves creating a back-up copy of data to use in the event of a system failure. One such data protection system involves the use of a computer at a remote site, often referred to as the secondary system, shadowing data storage at a primary site having a primary computer and storage. If there is a system failure at the primary site, then the data can be recovered from the secondary site. One such disaster recovery system that provides data shadowing is the International Business Machines Corporation (IBM) Peer-to-Peer Remote Copy (PPRC) system. In a PPRC system, a primary storage controller provides access to a primary mass storage systems, such as one or more Direct Access Storage Devices (DASDs), comprised of interconnected hard disk drives. The storage controller manages the flow of data from host systems to DASDs. A secondary controller provides a shadow copy of designated volumes in the primary DASD in a secondary mass storage system. A high speed dedicated line, such as Enterprise System Connection (ESCON) channels**, may be used to transfer data from the primary controller to the secondary controller. Another IBM system that provides data shadowing is the Extended Remote Copy (XRC) system.
In PPRC systems, a relationship is established between volumes in the primary DASD and the secondary DASD by copying the designated volumes from the primary DASD to the secondary DASD through the primary and secondary controllers. After the establishment phase, any updates to the protected volumes in the primary DASD are copied over to the secondary controller and DASD to synchronize the data therebetween.
The data recovery relationship cannot begin until all the shadowed primary volumes are copied over to the secondary volumes at the secondary site. For this reason, it is preferable to copy data over as quickly as possible to the secondary controller to complete the establishment phase and commence data shadowing. However, the secondary controller may also be servicing input/output (I/O) requests from host applications to non-PPRC volumes managed by the secondary controller. For this reason, the primary controller typically limits the number of I/O operations so as not to overburden the secondary controller and degrade performance of host applications accessing the secondary controller. In prior art systems, the primary controller will typically perform a fixed number of copy operations that will likely not significantly degrade the performance of host applications also accessing the secondary controller. After the primary controller receives acknowledgment that all the updates have completed, the primary controller will then initiate another set of the fixed number of copy operations until all the primary volumes are copied to secondary volumes in the secondary storage.
One drawback with this approach is that the number of write operations performed remains constant. Thus, even if total utilization of the secondary controller is low, prior art PPRC systems will continue with the same number of fixed copy operations during establishment even though the number of establishment copy operations sent could be increased without adversely degrading the performance of host access requests to the secondary controller.
Thus, there is a need in the art for an improved technique for copying data from one system to another that takes into account the overall load on the system receiving the data to copy.
To overcome the limitations in the prior art described above, preferred embodiments disclose a method, system, and program for executing write operations. A first number of write operations is initiated. Performance data is gathered indicating a total time for a second number of the initiated write operations to complete. After at least one initiated write operation has completed, at least one additional write operation is initiated if a number of outstanding write operations is less than a maximum number of write operations. The maximum number of write operations is adjusted if the performance data meets at least one threshold.
In further embodiments, the write operations are part of a series of write operations. In such case, performance data is gathered and adjustments to the maximum number considered each time the second number of write operations are completed while there are further write operations in the series of write operations to perform.
In still further embodiments, the total time for the second number of write operations to complete is compared with a previous best time for the second number of write operations to complete. The maximum number is adjusted if the time for the write operations to complete meets at least one threshold with respect to the previous best time.
Still further, the maximum number is adjusted upward if the total time exceeds the previous best time by a percentage amount. Alternatively, the maximum number is adjusted downward if the total time is less than the previous best time by a percentage amount.
Preferred embodiments provide an improved method, system, and program to determine how many write operations to execute at a time when performing a series of, write operations. Performance data is gathered to determine whether the number of write operations outstanding at any given time should be adjusted. If performance has improved, than the maximum number of outstanding write operations may increase without adversely affecting the performance of other devices accessing the storage. Alternatively, if performance has declined, then the maximum number of outstanding write operations may be adjusted downward to reduce the load on the storage device or storage controller managing the storage device. Preferred embodiments thus provide a method for dynamically adjusting the maximum number of outstanding write operations at one time against a storage device to optimize performance and at the same time avoid adversely affecting the load of the storage device and the performance with respect to other systems that may be accessing the storage.